package pl.pollub.medikit.client.ui;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.TextBoxBase;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.TextArea;

public class UILekarzNowaWizyta extends DeckPanel {
	public UILekarzNowaWizyta(final DialogBox dlg) {
		
		AbsolutePanel absolutePanel = new AbsolutePanel();
		add(absolutePanel);
		absolutePanel.setSize("683px", "530px");
		
		Label label = new Label("Imię:");
		absolutePanel.add(label, 10, 10);
		label.setSize("200px", "20px");
		
		TextBox textBox = new TextBox();
		textBox.setTextAlignment(TextBoxBase.ALIGN_LEFT);
		absolutePanel.add(textBox, 10, 40);
		textBox.setSize("190px", "8px");
		
		Label label_1 = new Label("Nazwisko:");
		absolutePanel.add(label_1, 240, 10);
		label_1.setSize("200px", "20px");
		
		TextBox textBox_1 = new TextBox();
		textBox_1.setTextAlignment(TextBoxBase.ALIGN_LEFT);
		absolutePanel.add(textBox_1, 240, 40);
		textBox_1.setSize("190px", "8px");
		
		Label label_2 = new Label("PESEL:");
		absolutePanel.add(label_2, 470, 10);
		label_2.setSize("200px", "20px");
		
		TextBox textBox_2 = new TextBox();
		textBox_2.setTextAlignment(TextBoxBase.ALIGN_LEFT);
		absolutePanel.add(textBox_2, 470, 40);
		textBox_2.setSize("190px", "8px");
		
		Button btnNewButton = new Button("Zapisz");
		absolutePanel.add(btnNewButton, 299, 492);
		btnNewButton.setSize("85px", "28px");
		
		Label lblDiagnoza = new Label("Diagnoza");
		absolutePanel.add(lblDiagnoza, 10, 74);
		
		TextBox textBox_3 = new TextBox();
		absolutePanel.add(textBox_3, 10, 96);
		textBox_3.setSize("650px", "16px");
		
		Label lblOpis = new Label("Opis");
		absolutePanel.add(lblOpis, 10, 142);
		
		Label lblRecepty = new Label("Recepty");
		absolutePanel.add(lblRecepty, 10, 300);
		
		Label lblSkierowania = new Label("Skierowania");
		absolutePanel.add(lblSkierowania, 365, 300);
		
		TextArea textArea = new TextArea();
		absolutePanel.add(textArea, 10, 164);
		textArea.setSize("650px", "110px");
		
		TextArea textArea_1 = new TextArea();
		absolutePanel.add(textArea_1, 10, 322);
		textArea_1.setSize("310px", "140px");
		
		TextArea textArea_2 = new TextArea();
		absolutePanel.add(textArea_2, 358, 322);
		textArea_2.setSize("302px", "140px");
		btnNewButton.addClickHandler(new ClickHandler() {
			@Override
			public void onClick(ClickEvent event) {
				dlg.hide();
			}
		});
		showWidget(0);
	}
}
